{"ast":null,"code":"import * as React from 'react';\nvar StatisticNumber = function StatisticNumber(props) {\n  var value = props.value,\n    formatter = props.formatter,\n    precision = props.precision,\n    decimalSeparator = props.decimalSeparator,\n    _props$groupSeparator = props.groupSeparator,\n    groupSeparator = _props$groupSeparator === void 0 ? '' : _props$groupSeparator,\n    prefixCls = props.prefixCls;\n  var valueNode;\n  if (typeof formatter === 'function') {\n    // Customize formatter\n    valueNode = formatter(value);\n  } else {\n    // Internal formatter\n    var val = String(value);\n    var cells = val.match(/^(-?)(\\d*)(\\.(\\d+))?$/);\n    // Process if illegal number\n    if (!cells || val === '-') {\n      valueNode = val;\n    } else {\n      var negative = cells[1];\n      var int = cells[2] || '0';\n      var decimal = cells[4] || '';\n      int = int.replace(/\\B(?=(\\d{3})+(?!\\d))/g, groupSeparator);\n      if (typeof precision === 'number') {\n        decimal = decimal.padEnd(precision, '0').slice(0, precision > 0 ? precision : 0);\n      }\n      if (decimal) {\n        decimal = \"\".concat(decimalSeparator).concat(decimal);\n      }\n      valueNode = [/*#__PURE__*/React.createElement(\"span\", {\n        key: \"int\",\n        className: \"\".concat(prefixCls, \"-content-value-int\")\n      }, negative, int), decimal && /*#__PURE__*/React.createElement(\"span\", {\n        key: \"decimal\",\n        className: \"\".concat(prefixCls, \"-content-value-decimal\")\n      }, decimal)];\n    }\n  }\n  return /*#__PURE__*/React.createElement(\"span\", {\n    className: \"\".concat(prefixCls, \"-content-value\")\n  }, valueNode);\n};\nexport default StatisticNumber;","map":{"version":3,"names":["React","StatisticNumber","props","value","formatter","precision","decimalSeparator","groupSeparator","prefixCls","valueNode","val","String","cells","match","negative","int","decimal","replace","padEnd","slice","createElement","key","className"],"sources":["/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/antd/es/statistic/Number.js"],"sourcesContent":["import * as React from 'react';\nconst StatisticNumber = props => {\n  const {\n    value,\n    formatter,\n    precision,\n    decimalSeparator,\n    groupSeparator = '',\n    prefixCls\n  } = props;\n  let valueNode;\n  if (typeof formatter === 'function') {\n    // Customize formatter\n    valueNode = formatter(value);\n  } else {\n    // Internal formatter\n    const val = String(value);\n    const cells = val.match(/^(-?)(\\d*)(\\.(\\d+))?$/);\n    // Process if illegal number\n    if (!cells || val === '-') {\n      valueNode = val;\n    } else {\n      const negative = cells[1];\n      let int = cells[2] || '0';\n      let decimal = cells[4] || '';\n      int = int.replace(/\\B(?=(\\d{3})+(?!\\d))/g, groupSeparator);\n      if (typeof precision === 'number') {\n        decimal = decimal.padEnd(precision, '0').slice(0, precision > 0 ? precision : 0);\n      }\n      if (decimal) {\n        decimal = `${decimalSeparator}${decimal}`;\n      }\n      valueNode = [/*#__PURE__*/React.createElement(\"span\", {\n        key: \"int\",\n        className: `${prefixCls}-content-value-int`\n      }, negative, int), decimal && /*#__PURE__*/React.createElement(\"span\", {\n        key: \"decimal\",\n        className: `${prefixCls}-content-value-decimal`\n      }, decimal)];\n    }\n  }\n  return /*#__PURE__*/React.createElement(\"span\", {\n    className: `${prefixCls}-content-value`\n  }, valueNode);\n};\nexport default StatisticNumber;"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,IAAMC,eAAe,GAAG,SAAlBA,eAAe,CAAGC,KAAK,EAAI;EAC/B,IACEC,KAAK,GAMHD,KAAK,CANPC,KAAK;IACLC,SAAS,GAKPF,KAAK,CALPE,SAAS;IACTC,SAAS,GAIPH,KAAK,CAJPG,SAAS;IACTC,gBAAgB,GAGdJ,KAAK,CAHPI,gBAAgB;IAAA,wBAGdJ,KAAK,CAFPK,cAAc;IAAdA,cAAc,sCAAG,EAAE;IACnBC,SAAS,GACPN,KAAK,CADPM,SAAS;EAEX,IAAIC,SAAS;EACb,IAAI,OAAOL,SAAS,KAAK,UAAU,EAAE;IACnC;IACAK,SAAS,GAAGL,SAAS,CAACD,KAAK,CAAC;EAC9B,CAAC,MAAM;IACL;IACA,IAAMO,GAAG,GAAGC,MAAM,CAACR,KAAK,CAAC;IACzB,IAAMS,KAAK,GAAGF,G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